Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.social.workspace.gadgets

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.social.workspace.gadgets"
  version="1.0">

  <extension target="org.nuxeo.opensocial.gadgets.service"
    point="gadget">

    <internalGadget name="articles" disabled="false">
      <mountPoint>/articles</mountPoint>
      <entryPoint>articles.xml</entryPoint>
      <category>gadget.category.social.workspace.private</category>
      <icon>gadget-article.png</icon>
    </internalGadget>

    <internalGadget name="publicarticles" disabled="false">
      <mountPoint>/publicarticles</mountPoint>
      <entryPoint>publicarticles.xml</entryPoint>
      <category>gadget.category.social.workspace.public</category>
      <icon>gadget-article.png</icon>
    </internalGadget>

    <internalGadget name="news" disabled="false">
      <mountPoint>/news</mountPoint>
      <entryPoint>news.xml</entryPoint>
      <category>gadget.category.social.workspace.public</category>
      <icon>gadget-news.png</icon>
    </internalGadget>

    <internalGadget name="join" disabled="false">
      <mountPoint>/join</mountPoint>
      <directory>join</directory>
      <entryPoint>join.xml</entryPoint>
      <category>gadget.category.social.workspace.public</category>
      <icon>gadget-join.png</icon>
    </internalGadget>

    <internalGadget name="members" disabled="false">
      <mountPoint>/members</mountPoint>
      <directory>members</directory>
      <entryPoint>members.xml</entryPoint>
      <category>gadget.category.social.workspace.private</category>
      <icon>members.png</icon>
    </internalGadget>

    <internalGadget name="usersocialworkspaces" disabled="false">
      <mountPoint>/usersocialworkspaces</mountPoint>
      <directory>usersocialworkspaces</directory>
      <entryPoint>usersocialworkspaces.xml</entryPoint>
      <category>gadget.category.social.workspace.private</category>
      <icon>user_socialworkspaces.png</icon>
    </internalGadget>

    <internalGadget name="publicdocuments" disabled="false">
      <mountPoint>/publicdocuments</mountPoint>
      <directory>publicdocuments</directory>
      <entryPoint>publicdocuments.xml</entryPoint>
      <category>gadget.category.social.workspace.public</category>
      <icon>publicdocuments.png</icon>
    </internalGadget>

    <internalGadget name="publicsocialworkspaces" disabled="false">
      <mountPoint>/publicsocialworkspaces</mountPoint>
      <directory>publicsocialworkspaces</directory>
      <entryPoint>publicsocialworkspaces.xml</entryPoint>
      <category>gadget.category.social.workspace.public</category>
      <icon>public_social_workspaces.png</icon>
    </internalGadget>

    <internalGadget name="socialworkspaceactivitystream"
      disabled="false">
      <documentation>
        This gadget displays the activities of a Social Workspace.

        The following user preferences can be used to configure it:
        - nuxeoTargetContextPath: the path of the Social Workspace for which
          to retrieve the activities
        - activityLinkBuilder: activity link builder name to use to generate
          documents and user URLs

        How to include the socialworkspaceactivitystream gadget in a JSF context:
        <code>
          <div class="gadget-socialworkspaceactivitystream threeQuarterWidth"></div>
          <script type="text/javascript">
            jQuery('.gadget-socialworkspaceactivitystream').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/socialworkspaceactivitystream/socialworkspaceactivitystream.xml',
                  title: '',
                  userPrefs: {
                    activityLinkBuilder: {
                      value: 'default'
                    },
                    nuxeoTargetContextPath: {
                      value: '#{currentDocument.pathAsString}'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the socialworkspaceactivitystream gadget in a WebEngine page:
        <code>
          <link rel="stylesheet" href="${contextPath}/css/opensocial/light-container-gadgets.css" />
          <script type="text/javascript" src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1"></script>
          <script type="text/javascript" src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js"></script>

          <div class="gadget-socialworkspaceactivitystream gadgets-gadget-chrome"></div>
          <script type="text/javascript">
            $('.gadget-socialworkspaceactivitystream').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/socialworkspaceactivitystream/socialworkspaceactivitystream.xml',
                userPrefs: {
                  activityLinkBuilder: {
                    value: 'default'
                  },
                  nuxeoTargetContextPath: {
                    value: '${doc.pathAsString}'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>

      <mountPoint>/socialworkspaceactivitystream</mountPoint>
      <directory>socialworkspaceactivitystream</directory>
      <entryPoint>socialworkspaceactivitystream.xml</entryPoint>
      <category>gadget.category.social.workspace.private</category>
      <icon>gadget-socialworkspaceactivitystream.png</icon>
    </internalGadget>

    <internalGadget name="socialworkspaceminimessages"
      disabled="false">
      <documentation>
        This gadget displays the mini messages of a Social Workspace.

        The following user preferences can be used to configure it:
        - nuxeoTargetContextPath: the path of the Social Workspace for which
          to retrieve the mini messages
        - activityLinkBuilder: activity link builder name to use to generate
          documents and user URLs

        How to include the socialworkspaceminimessages gadget in a JSF context:
        <code>
          <div class="gadget-socialworkspaceminimessages threeQuarterWidth"></div>
          <script type="text/javascript">
            jQuery('.gadget-socialworkspaceminimessages').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/socialworkspaceminimessages/socialworkspaceminimessages.xml',
                  title: '',
                  userPrefs: {
                    activityLinkBuilder: {
                      value: 'default'
                    },
                    nuxeoTargetContextPath: {
                      value: '#{currentDocument.pathAsString}'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the socialworkspaceminimessages gadget in a WebEngine page:
        <code>
          <link rel="stylesheet" href="${contextPath}/css/opensocial/light-container-gadgets.css" />
          <script type="text/javascript" src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1"></script>
          <script type="text/javascript" src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js"></script>

          <div class="gadget-socialworkspaceminimessages gadgets-gadget-chrome"></div>
          <script type="text/javascript">
            $('.gadget-socialworkspaceminimessages').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/socialworkspaceminimessages/socialworkspaceminimessages.xml',
                userPrefs: {
                  activityLinkBuilder: {
                    value: 'default'
                  },
                  nuxeoTargetContextPath: {
                    value: '${doc.pathAsString}'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>
      <mountPoint>/socialworkspaceminimessages</mountPoint>
      <directory>socialworkspaceminimessages</directory>
      <entryPoint>socialworkspaceminimessages.xml</entryPoint>
      <category>gadget.category.social.workspace.private</category>
      <icon>gadget-socialworkspaceminimessages.png</icon>
    </internalGadget>

  </extension>
</component>